<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            /* display: flex;
            justify-content: center;
            align-items: center; */
            display: table-cell;
            text-align: center;
            border: 1px solid transparent;
            vertical-align: middle;
            width: 100px;
            height: 100px;
            background-color: #000000;
        }
        
        .inner {
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 40px;
            background-color: #ff000f;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="inner">AAABBCDDCDASD</div>
    </div>
</body>

</html>